import request from "./request";

export function versionPage(data){
  console.log(data)
    return request({
      url:`/mgr/document/dcLibrary/version/list/${data.id}`,
      method:'get',
      params:data
    })
  }
  
  export function versionBack(data){
    return request({
      url:`/mgr/document/dcLibrary/version/rollback/${data.id}`,
      method:'get'
    })
  }
  
  export function versionDel(data){
    return request({
      url:`/mgr/document/dcLibrary/version/${data.id}`,
      method:'delete',
      data
    })
  }
  // 手动保存版本
  export function saveVersion(data){
    return request({
      url:`/mgr/document/dcLibrary/version/sub/versions`,
      method:"post",
      data
    })
  }
  
  // 通过id获取内容
  export function getByIdVersionContent(id){
    return request({
      url:`/mgr/document/dcLibrary/version/get/version/${id}`,
      method:'get',
    })
  }